Skip to content

update otlp tracing#1918

Merged
butonic merged 1 commit into
mainfrom
otlp-tracing
Nov 27, 2025
Merged

update otlp tracing#1918
butonic merged 1 commit into
mainfrom
otlp-tracing

Conversation

@butonic
Copy link
Copy Markdown
Member

@butonic butonic commented Nov 26, 2025

proposal to fix #1906

We can rely on the otlp SDK to parse and configure the traces provider. The only env var we need to handle is OTEL_TRACES_EXPORTER to decide which exporter to initialize. The new env var defaults to none but can be set to console or otlp.

When set to otlp the default env vars can be used to configure it:

// - OTEL_EXPORTER_OTLP_ENDPOINT
// - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT (takes precedence)
// - OTEL_EXPORTER_OTLP_HEADERS
// - OTEL_EXPORTER_OTLP_INSECURE
// - OTEL_EXPORTER_OTLP_CERTIFICATE (for custom CA)
// - OTEL_TRACES_SAMPLER
// - OTEL_TRACES_SAMPLER_ARG

See https://opentelemetry.io/docs/languages/sdk-configuration/general/ and https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/ for details.

To send the traces eg to jaeger (which supports otlp OOTB):

# Use OTLP exporter with all options
export OTEL_TRACES_EXPORTER=otlp
export OTEL_EXPORTER_OTLP_ENDPOINT=https://collector:4317
export OTEL_EXPORTER_OTLP_INSECURE=true
export OTEL_TRACES_SAMPLER=parentbased_traceidratio
export OTEL_TRACES_SAMPLER_ARG=0.1

The best part: +1.167 -28.652

@butonic butonic added the Type:Maintenance E.g. technical debt, packaging, etc. label Nov 26, 2025
@butonic butonic self-assigned this Nov 26, 2025
@github-project-automation github-project-automation Bot moved this to Qualification in OpenCloud Team Board Nov 26, 2025
@butonic butonic moved this from Qualification to In Progress in OpenCloud Team Board Nov 26, 2025
@butonic butonic force-pushed the otlp-tracing branch 2 times, most recently from 3e7b813 to 65948e2 Compare November 26, 2025 10:34
Copy link
Copy Markdown
Member

@dragonchaser dragonchaser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While you are at it, why do we not kill the one TraceExporter per service into one TraceExporter for the whole thing? Imho it does not make sense to configure that per service, either you want traces or not. If you need traces for a specific service, just filter it in your OTLP UI?

Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
@butonic butonic merged commit 10913ca into main Nov 27, 2025
58 checks passed
@butonic butonic deleted the otlp-tracing branch November 27, 2025 11:57
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenCloud Team Board Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type:Maintenance E.g. technical debt, packaging, etc.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

"go.opentelemetry.io/otel/exporters/jaeger" is deprecated

2 participants